import time
from selenium import webdriver
from selenium.webdriver.common.by import By

driver = webdriver.Chrome()
driver.get('https:www.baidu.com')
driver.maximize_window()
time.sleep(2)
#查看全部cookie
# print(driver.get_cookies())
#查询特定name的cookie
# print(driver.get_cookie('BAIDUID_BFESS'))
#添加cookie
driver.add_cookie({'name':"cxk",'value':'520'})
#删除部分特点name的cookie
# driver.delete_cookie('cxk')
#删除所有cookie
driver.delete_all_cookies()
print(driver.get_cookies())